package com.xiangyang.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiangyang.entity.Role;
import org.apache.ibatis.annotations.Select;

public interface IRoleMapper extends BaseMapper<Role> {
@Select("SELECT role_name " +
        "FROM role t1 " +
        "INNER JOIN user t2 ON t1.role_id = t2.user_type " +
        "WHERE t2.user_phone = #{phone}")
    String getRoleNameByPhone(String phone);
}
